package org.simple.wechat.demo.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.simple.wechat.demo.config.IEnumDeserializer;
import org.simple.wechat.demo.config.IEnumSerializer2;
import org.simple.wechat.demo.ienum.IEnum;

/***
 * @author gaoqijin
 * @date 2020-9-10
 * @Description
 */
@JsonSerialize(using = IEnumSerializer2.class)
@JsonDeserialize(using = IEnumDeserializer.class)
public enum OrderLevel implements IEnum {

  /**
   * 事件的紧急级别
   */
  NORMAL(1, "一般"), IMPORTANT(2, "重要"), URGENT(3, "紧急")
  ;
  private  int code;
  private String desc;
  OrderLevel(int code,String desc){
    this.code = code;
    this.desc = desc;
  }
  ;

  @Override public int getCode() {
    return this.code;
  }

  @Override public String getDesc() {
    return this.desc;
  }

  @Override public String getName() {
    return name();
  }
}
